<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
Route::rule('test', 'adminapiv3/Test/test');//测试

Route::group('adminapi/v3',  function () {
    //异步发送邮件
    Route::rule('email/manage/public/send', 'adminapiv3/Email/send');//发送邮件

    //安装
    Route::rule('install/manage/public/gethostfile', 'adminapiv3/Install/getHostFile');//主机码文件下载
    Route::rule('install/manage/public/online', 'adminapiv3/Install/online');//在线授权
    Route::rule('install/manage/public/offline', 'adminapiv3/Install/offline');//离线授权
    Route::rule('install/manage/public/userconfig', 'adminapiv3/Install/userConfig');//设置系统管理员
    Route::rule('install/manage/public/addproxyip', 'adminapiv3/Install/addProxyIp');//设置代理服务器IP
    Route::rule('install/manage/public/getmodule', 'adminapiv3/Install/getModule');//获取模块信息

    Route::rule('login/manage/public/login', 'adminapiv3/Login/login');//登录
    Route::rule('login/manage/public/code', 'adminapiv3/Login/code');//验证码
    Route::rule('system/manage/public/isinstall', 'adminapiv3/Index/isInstall');//是否安装


    Route::rule('index/manage/public/rand', 'adminapiv3/Index/rand');//首页排行榜
    Route::rule('index/manage/public/hostresource', 'adminapiv3/Index/hostResource');//首页主机资源
    Route::rule('index/manage/public/attackratio', 'adminapiv3/Index/attackRatio');//首页攻击占比
    Route::rule('index/manage/public/platform/auth', 'adminapiv3/ServerAuth/platformAuthInfo');//登录页面授权信息
    Route::rule('index/manage/public/user/platform/info', 'adminapiv3/ServerAuth/userAuthInfo');//首页排行榜


//IPS模块
    //官方规则组
    Route::rule('host/manage/get/:host_id/normalrule/group/list', 'adminapiv3/NormalRuleGroup/list');//官方规则组列表
    Route::rule('host/manage/do/:host_id/normalrule/group/open', 'adminapiv3/NormalRuleGroup/open');//启用
    Route::rule('host/manage/do/:host_id/normalrule/group/close', 'adminapiv3/NormalRuleGroup/close');//停用
    Route::rule('host/manage/do/:host_id/normalrule/group/modify/handle', 'adminapiv3/NormalRuleGroup/modifyHandle');//修改处理方式


    //官方规则
    Route::rule('host/manage/get/:host_id/normalrule/list/:group_id', 'adminapiv3/NormalRule/list');//列表
    Route::rule('host/manage/do/:host_id/normalrule/open', 'adminapiv3/NormalRule/open');//启用
    Route::rule('host/manage/do/:host_id/normalrule/close', 'adminapiv3/NormalRule/close');//停用
    Route::rule('host/manage/do/:host_id/normalrule/setting', 'adminapiv3/NormalRule/setting');//配置
    Route::rule('host/manage/do/:host_id/normalrule/bulk/modify/handle', 'adminapiv3/NormalRule/bulkModifyHandle');//批量修改处理方式

    //自定义规则
    Route::rule('host/manage/get/ipsrule/data', 'adminapiv3/IpsRule/data');//下拉列表选项
    Route::rule('host/manage/get/:host_id/ipsrule/list', 'adminapiv3/IpsRule/list');//列表
    Route::rule('host/manage/do/:host_id/ipsrule/modify', 'adminapiv3/IpsRule/modify');//修改
    Route::rule('host/manage/do/:host_id/ipsrule/open', 'adminapiv3/IpsRule/open');//启用
    Route::rule('host/manage/do/:host_id/ipsrule/close', 'adminapiv3/IpsRule/close');//停用
    Route::rule('host/manage/do/delete/:host_id/ipsrule/del', 'adminapiv3/IpsRule/del');//删除
    Route::rule('host/manage/do/clear/:host_id/ipsrule/clear', 'adminapiv3/IpsRule/clear');//清空
    Route::rule('host/manage/do/:host_id/ipsrule/add', 'adminapiv3/IpsRule/add');//添加

    Route::rule('email/manage/get/info', 'adminapiv3/Email/info');//邮件信息
    Route::rule('email/manage/do/modify', 'adminapiv3/Email/modify');//修改邮件信息

    //高级管理
    Route::rule('rebootsystem/manage/excute/restartplatform', 'adminapiv3/DefaultSetting/restartPlatform');//重启平台操作系统

    //数据库管理
    Route::rule('database/backup/manage/excute', 'adminapiv3/ServerDatabaseBak/backup');//备份数据库
    Route::rule('database/reset/manage/get', 'adminapiv3/ServerDatabaseBak/list');//还原数据库列表
    Route::rule('database/reset/manage/do', 'adminapiv3/ServerDatabaseBak/reset');//还原数据库
    Route::rule('database/cleardir/manage/excute', 'adminapiv3/ServerDatabaseBak/clearDir');//清空备份目录
    Route::rule('database/clear/manage/excute', 'adminapiv3/ServerDatabaseBak/clear');//清空数据库

    //排除策略
    Route::rule('host/manage/get/:host_id/exclude/list', 'adminapiv3/HostExclude/list');//列表
    Route::rule('host/manage/do/:host_id/exclude/add', 'adminapiv3/HostExclude/add');//添加
    Route::rule('host/manage/do/delete/:host_id/exclude/del', 'adminapiv3/HostExclude/del');//删除
    Route::rule('host/manage/do/:host_id/exclude/modify', 'adminapiv3/HostExclude/modify');//编辑

    //防火墙规则
    Route::rule('host/manage/get/iptables/list/:host_id', 'adminapiv3/IpsOriginalRule/list');//防火墙规则列表
    Route::rule('host/manage/do/iptables/openmonitor/:host_id', 'adminapiv3/IpsOriginalRule/openMonitor');//防火墙规则打开监控
    Route::rule('host/manage/do/iptables/colsemonitor/:host_id', 'adminapiv3/IpsOriginalRule/closeMonitor');//防火墙规则关闭监控
    Route::rule('host/manage/do/delete/iptables/del/:host_id', 'adminapiv3/IpsOriginalRule/del');//防火墙规则删除规则
    Route::rule('host/manage/do/iptables/importrule/:host_id', 'adminapiv3/IpsOriginalRule/importRule');//防火墙规则转换并上传

    //防篡改策略->站点管理
    Route::rule('host/manage/get/:host_id/websiteprotect/list', 'adminapiv3/IpsWebsiteProtect/list');//列表
    //Route::rule('host/manage/get/data', 'adminapiv3/IpsWebsiteProtect/data');//列表首页数据
    Route::rule('host/manage/do/websiteprotect/add', 'adminapiv3/IpsWebsiteProtect/add');//添加
    Route::rule('host/manage/do/delete/websiteprotect/del', 'adminapiv3/IpsWebsiteProtect/del');//删除
    Route::rule('host/manage/do/websiteprotect/delhostid', 'adminapiv3/IpsWebsiteProtect/delHostId');//重新导入站点
    Route::rule('host/manage/get/websiteprotect/info', 'adminapiv3/IpsWebsiteProtect/info');//站点详情
    Route::rule('host/manage/do/websiteprotect/modify', 'adminapiv3/IpsWebsiteProtect/modify');//站点编辑

    //主机列表
    Route::rule('host/manage/get/list', 'adminapiv3/Host/list');//主机列表
    Route::rule('host/manage/get/filterdata', 'adminapiv3/Host/filterData');//主机列表筛选数据
    Route::rule('host/manage/excute/clearblack', 'adminapiv3/Host/clearBlack');//清空黑名单
    Route::rule('host/manage/do/delete', 'adminapiv3/Host/delete');//删除主机
    Route::rule('host/manage/get/clientdownload', 'adminapiv3/Host/clientDownload');//安装包下载

    //文件查杀
    Route::rule('host/manage/do/filekill/start', 'adminapiv3/Host/fileKillStart');//开始文件查杀
    Route::rule('host/manage/do/filekill/stop', 'adminapiv3/Host/fileKillStop');//停止文件查杀
    Route::rule('host/manage/get/filekill/runstatus', 'adminapiv3/Host/fileKillRunStatus');//文件查杀运行状态

    Route::rule('host/manage/get/:host_id/runstatus', 'adminapiv3/Host/runStatus');//运行状态
    Route::rule('host/manage/get/:host_id/hostinfo', 'adminapiv3/Host/hostInfo');//主机详情
    Route::rule('host/manage/do/:host_id/wipfmodify', 'adminapiv3/Host/wipfModify');//网络防御配置修改
    Route::rule('host/manage/do/:host_id/defensemodify', 'adminapiv3/Host/defenseModify');//主动防御配置修改
    Route::rule('host/manage/do/:host_id/descriptionmodify', 'adminapiv3/Host/descriptionModify');//主机备注修改
    Route::rule('host/manage/excute/defaultsetting', 'adminapiv3/DefaultSetting/defaultSetting');//恢复默认设置
    Route::rule('host/manage/excute/restartdevice', 'adminapiv3/DefaultSetting/restartDevice');//重启操作系统

    //设备管理
    Route::rule('local/manage/get/disk', 'adminapiv3/LocalInfo/disk');//存储状态

    //网络攻击日志
    Route::rule('log/network/attack/manage/get/warning', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@warnning');//告警
    Route::rule('log/network/attack/manage/do/add/ip/to/white/list', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@addIpToWhiteList');//添加ip到白名单
    Route::rule('log/network/attack/manage/do/clear/ip/to/white/list', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@clearIpToWhiteList');//清空ip到白名单
    Route::rule('log/network/attack/manage/get/list', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@list');//列表
    Route::rule('log/network/attack/manage/do/delete', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@bulkDelete');//批量删除
    Route::rule('log/network/attack/manage/do/clear', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@clear');//清空事件
    Route::rule('log/network/attack/manage/get/data/package', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@dataPackage');//获取数据包
    Route::rule('log/network/attack/manage/do/enable/rule', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@enableRule');//启用规则
    Route::rule('log/network/attack/manage/do/disable/rule', '\app\adminapiv3\controller\attackLogManage\networkLogManage\NetworkAttackController@disableRule');//禁用规则

    //主动防御
    Route::rule('log/auto/defense/manage/get/list', '\app\adminapiv3\controller\attackLogManage\fileLogManage\AutoDefenseController@list');//列表
    Route::rule('log/auto/defense/manage/do/delete', '\app\adminapiv3\controller\attackLogManage\fileLogManage\AutoDefenseController@bulkDelete');//批量删除
    Route::rule('log/auto/defense/manage/do/clear', '\app\adminapiv3\controller\attackLogManage\fileLogManage\AutoDefenseController@clear');//清空事件
    Route::rule('log/auto/defense/manage/do/rest/file', '\app\adminapiv3\controller\attackLogManage\fileLogManage\AutoDefenseController@fileReset');//恢复文件
    Route::rule('log/auto/defense/manage/get/data/package', '\app\adminapiv3\controller\attackLogManage\fileLogManage\AutoDefenseController@dataPackage');//获取数据包

    //文件篡改
    Route::rule('log/illegel/changes/manage/get/list', '\app\adminapiv3\controller\attackLogManage\fileLogManage\FileIllegalModifyController@list');//列表
    Route::rule('log/illegel/changes/manage/do/delete', '\app\adminapiv3\controller\attackLogManage\fileLogManage\FileIllegalModifyController@bulkDelete');//批量删除
    Route::rule('log/illegel/changes/manage/do/clear', '\app\adminapiv3\controller\attackLogManage\fileLogManage\FileIllegalModifyController@clear');//清空事件

    //系统提权
    Route::rule('log/system/empowerment/manage/get/list', '\app\adminapiv3\controller\attackLogManage\fileLogManage\SystemEmpowermentController@list');//列表
    Route::rule('log/system/empowerment/manage/get/filterdata', '\app\adminapiv3\controller\attackLogManage\fileLogManage\SystemEmpowermentController@filterdata');//列表筛选数据
    Route::rule('log/system/empowerment/manage/do/delete', '\app\adminapiv3\controller\attackLogManage\fileLogManage\SystemEmpowermentController@bulkDelete');//批量删除
    Route::rule('log/system/empowerment/manage/do/clear', '\app\adminapiv3\controller\attackLogManage\fileLogManage\SystemEmpowermentController@clear');//清空事件

    //查杀日志
    Route::rule('log/screening/manage/get/list', '\app\adminapiv3\controller\attackLogManage\screeningLogManage\ScreeningLogController@list');//列表
    Route::rule('log/screening/manage/get/filterdata', '\app\adminapiv3\controller\attackLogManage\screeningLogManage\ScreeningLogController@filterData');//列表筛选数据
    Route::rule('log/screening/manage/do/delete', '\app\adminapiv3\controller\attackLogManage\screeningLogManage\ScreeningLogController@bulkDelete');//批量删除
    Route::rule('log/screening/manage/do/clear', '\app\adminapiv3\controller\attackLogManage\screeningLogManage\ScreeningLogController@clear');//清空事件
    Route::rule('log/screening/manage/do/rest/file', '\app\adminapiv3\controller\attackLogManage\screeningLogManage\ScreeningLogController@fileReset');//恢复文件
    Route::rule('log/screening/manage/get/data/package', '\app\adminapiv3\controller\attackLogManage\screeningLogManage\ScreeningLogController@dataPackage');//获取数据包

    //云安全日志
    Route::rule('log/cloud/safe/manage/get/list', '\app\adminapiv3\controller\attackLogManage\cloudSafeLogManage\CloudSafeLogController@list');//列表
    Route::rule('log/cloud/safe/manage/do/delete', '\app\adminapiv3\controller\attackLogManage\cloudSafeLogManage\CloudSafeLogController@bulkDelete');//批量删除
    Route::rule('log/cloud/safe/manage/do/clear', '\app\adminapiv3\controller\attackLogManage\cloudSafeLogManage\CloudSafeLogController@clear');//清空事件

    //更新日志
    Route::rule('log/update/manage/get/list', 'adminapiv3/ServerUpdateLog/list');//系统更新日志
    Route::rule('log/update/manage/get/hostlist', 'adminapiv3/ServerUpdateLog/hostList');//系统更新日志
    Route::rule('log/update/manage/do/delete', 'adminapiv3/ServerUpdateLog/del');//系统更新日志删除
    Route::rule('log/update/manage/do/clear', 'adminapiv3/ServerUpdateLog/clear');//系统更新日志清空

    Route::rule('auth/manage/get/hostfile', 'adminapiv3/ServerAuth/getHostFile');//下载主机码文件
    Route::rule('auth/manage/get/info', 'adminapiv3/ServerAuth/list');//授权信息
    Route::rule('auth/manage/do/online', 'adminapiv3/ServerAuth/online');//---在线授权
    Route::rule('auth/manage/do/offline', 'adminapiv3/ServerAuth/offline');//---离线授权

    //操作记录日志
    Route::rule('log/operationlog/manage/get/list', 'adminapiv3/ServerOptionHistory/list');//操作日志列表

    //系统日志
    Route::rule('log/system/manage/get/list', 'adminapiv3/ServerSystemLog/list');//系统日志

    //系统配置
    Route::rule('systemconfig/manage/get/info', 'adminapiv3/SystemConfig/configGet');//获取系统配置
    Route::rule('systemconfig/manage/do/modify', 'adminapiv3/SystemConfig/configModify');//修改系统配置



    //用户管理
    Route::rule('user/group/manage/get/group/:user_group_id/list', '\app\adminapiv3\controller\userManage\UserController@list');//用户列表
    Route::rule('user/group/manage/do/user/add', '\app\adminapiv3\controller\userManage\UserController@add');//用户列表
    Route::rule('user/group/manage/do/user/reset/password', '\app\adminapiv3\controller\userManage\UserController@resetPassword');//重置用户密码
    Route::rule('user/group/manage/do/delete/user/delete', '\app\adminapiv3\controller\userManage\UserController@delete');//删除用户
    Route::rule('user/group/manage/do/user/modify', '\app\adminapiv3\controller\userManage\UserController@modify');//修改用户信息

    //用户组管理
    Route::rule('user/group/manage/get/module', '\app\adminapiv3\controller\userManage\UserGroupController@module');//用户组授权模块列表
    Route::rule('user/group/manage/get/list', '\app\adminapiv3\controller\userManage\UserGroupController@list');//用户组列表
    Route::rule('user/group/manage/get/info', '\app\adminapiv3\controller\userManage\UserGroupController@info');//用户组详细信息
    Route::rule('user/group/manage/do/add', '\app\adminapiv3\controller\userManage\UserGroupController@add');//用户组-添加
    Route::rule('user/group/manage/do/delete', '\app\adminapiv3\controller\userManage\UserGroupController@delete');//删除用户组
    Route::rule('user/group/manage/do/modify', '\app\adminapiv3\controller\userManage\UserGroupController@modify');//修改用户组信息
    Route::rule('user/group/manage/do/login/setting', '\app\adminapiv3\controller\userManage\UserGroupController@loginSetting');//设置
    Route::rule('user/group/manage/get/login/setting', '\app\adminapiv3\controller\userManage\UserGroupController@getLoginSetting');//获取登录设置

    //用户组权限管理
    Route::rule('user/group/manage/get/permissions/group/:user_group_id/list', '\app\adminapiv3\controller\permissionsManage\PermissionsController@groupPermissionsList');//获取用户组权限
    Route::rule('user/group/manage/do/permissions/group/:user_group_id/modify', '\app\adminapiv3\controller\permissionsManage\PermissionsController@modifyUserGroupPermissions')->pattern(['user_group_id'=>'\d+']);//修改用户组权限

    //用户权限管理
    Route::rule('user/group/manage/do/permissions/user/:user_id/list', '\app\adminapiv3\controller\permissionsManage\PermissionsController@userPermissionsList')->pattern(['user_id'=>'\d+']);//获取用户权限
    Route::rule('user/group/manage/do/permissions/user/:user_id/modify', '\app\adminapiv3\controller\permissionsManage\PermissionsController@userPermissionsModify')->pattern(['user_id'=>'\d+']);//修改用户权限

    //系统设置->产品更新
    Route::rule('update/online/manage/excute', 'adminapiv3/ServerUpdate/online');//---在线更新
    Route::rule('update/offline/manage/excute', 'adminapiv3/ServerUpdate/offline');//---离线更新



    //平台管理->信任主机->IP白名单
    Route::rule('platform/allowip/manage/get/list', 'adminapiv3/ServerAllowIp/list');//---IP白名单列表
    Route::rule('platform/allowip/manage/do/add', 'adminapiv3/ServerAllowIp/add');//---IP白名单添加
    Route::rule('platform/allowip/manage/do/modify', 'adminapiv3/ServerAllowIp/modify');//---IP白单修改
    Route::rule('platform/allowip/manage/do/delete', 'adminapiv3/ServerAllowIp/del');//---IP白名单删除
    Route::rule('platform/allowip/manage/do/setting', 'adminapiv3/ServerAllowIp/setting');//---IP白名单功能设置




})->middleware('Check');
